/*
 *    Copyright (c) 2018-2025, boss All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the boss developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: boss
 */

package com.hopes.bizz.close.visitor.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hopes.bizz.close.visitor.dto.ClosedHazardCarApplyDTO;
import com.hopes.bizz.close.visitor.dto.ClosedHazardCarApplyExcelDTO;
import com.hopes.bizz.close.visitor.dto.ClosedHazardCardBindGpsDTO;
import com.hopes.bizz.close.visitor.dto.ClosedVisitorApplyAuditDTO;
import com.hopes.bizz.close.visitor.entity.ClosedHazardCarApplyEntity;
import com.hopes.bizz.close.visitor.vo.ClosedHazardCarApplyExcelVO;
import com.hopes.bizz.close.visitor.vo.ClosedHazardCarApplyVO;
import com.hopes.boss.common.service.ExcelService;

import java.util.List;

/**
 * 危险品车辆预约
 *
 * @author pig
 * @date 2024-01-26 14:34:05
 */
public interface ClosedHazardCarApplyService extends ExcelService<ClosedHazardCarApplyExcelDTO, ClosedHazardCarApplyExcelVO, ClosedHazardCarApplyEntity> {

    /**
     * 提交预约信息
     * @param id  id
     * @return    结果集
     */
    boolean submit(Long id);

    /**
     * 获取危险品预约记录VO
     * @param id  id
     * @return    结果
     */
    ClosedHazardCarApplyVO getVoById(Long id);

    /**
     * 根据运单号获取预约记录VO
     * @param billNo    运单号
     * @return          结果
     */
    ClosedHazardCarApplyVO getVoByBillNo(String billNo);

    /**
     * 新增并提交
     * @param closedHazardCarApply   危险品预约信息
     * @return                       结果
     */
    boolean saveAndSubmit(ClosedHazardCarApplyEntity closedHazardCarApply);

    /**
     * 审核
     * @param closedVisitorApplyAuditDTO 对象
     * @return    结果集
     */
    boolean auditById(ClosedVisitorApplyAuditDTO closedVisitorApplyAuditDTO);


    /**
     * 查询绑定了GPS设备的记录
     * @return 结果集
     */
    List<ClosedHazardCarApplyEntity> queryBindGpsDeviceList();

    /**
     * 操作GPS设备
     * @param closedHazardCardBindGpsDTO 对象
     * @return   结果
     */
    boolean operateGpsDevice(ClosedHazardCardBindGpsDTO closedHazardCardBindGpsDTO);




    /**
     * 分页查询
     * @param page      分页参数
     * @param wrapper   查询参数
     * @return          结果集
     */
    IPage<ClosedHazardCarApplyVO> pageVO(Page page, LambdaQueryWrapper<ClosedHazardCarApplyEntity> wrapper);


    /**
     * 移动端分页查询我的危险品车辆预约申请
     * @param page                       分页参数
     * @param closedHazardCarApplyDTO    查询参数
     * @return                           结果集
     */
    IPage<ClosedHazardCarApplyEntity> queryAppHazardCarApplySelfPage(Page page, ClosedHazardCarApplyDTO closedHazardCarApplyDTO);

    /**
     * 移动端分页查询 企业待审批、已审批的危险品车辆预约申请
     * @param page                           分页参数
     * @param auditStatusList                审核状态
     * @param closedHazardCarApplyDTO        查询参数
     * @return                               结果集
     */
    IPage<ClosedHazardCarApplyEntity> queryAppHazardCarApplyAuditPage(Page page, List<Integer> auditStatusList, ClosedHazardCarApplyDTO closedHazardCarApplyDTO);


}
